﻿/*****************************************************************//**
 * @file    FITKAcousticsVTKGraphObjectSEACavity.h
 * @brief   Graph object for SEA sub-system cavity data.
 *  
 * @author  ChengHaotian (yeguangbaozi@foxmail.com)
 * @date    2024-11-04
 *********************************************************************/

#ifndef __FITKACOUSTICSVTKGRAPHOBJECTSEACAVITY_H__
#define __FITKACOUSTICSVTKGRAPHOBJECTSEACAVITY_H__

#include "FITKAcousticsVTKGraphObjectSEASubSystem.h"

#include "FITKAcousticsVTKGraphAdaptorAPI.h"

// Forward declaration
class vtkUnstructuredGrid;
class vtkPoints;

class FITKAcousticsVTKGraphActor;

namespace Acoustics
{
    class FITKSEASubSysCavity;
}

namespace Exchange
{
    /**
     * @brief   Graph object for 'SEA sub-system cavity'.
     * @author  ChengHaotian (yeguangbaozi@foxmail.com)
     * @date    2024-11-04
     */
    class FITKACOUSTICSGRAPHADAPTORAPI FITKAcousticsVTKGraphObjectSEACavity : public FITKAcousticsVTKGraphObjectSEASubSystem
    {
        // Regist
        FITKGraphObjectRegist(FITKAcousticsVTKGraphObjectSEACavity, FITKAcousticsVTKGraphObjectSEASubSystem);
        FITKCLASS(Exchange, FITKAcousticsVTKGraphObjectSEACavity);

    public:
        /**
         * @brief   Constructor.
         * @param   cavity: The sub-system cavity data
         * @author  ChengHaotian (yeguangbaozi@foxmail.com)
         * @date    2024-11-04
         */
        FITKAcousticsVTKGraphObjectSEACavity(Acoustics::FITKSEASubSysCavity* cavity);

        /**
         * @brief   Destructor.
         * @author  ChengHaotian (yeguangbaozi@foxmail.com)
         * @date    2024-11-04
         */
        ~FITKAcousticsVTKGraphObjectSEACavity() = default;

        /**
         * @brief   Update the visibility with data object's visibility.[override]
         * @author  ChengHaotian (yeguangbaozi@foxmail.com)
         * @date    2024-11-12
         */
        void updateVisibility() override;

    private:
        /**
         * @brief   Generate the vtkDataSet for the sub-system.[override]
         * @param   subSys: The sub-system cavity data
         * @return  Is the data valid
         * @author  ChengHaotian (yeguangbaozi@foxmail.com)
         * @date    2024-11-04
         */
        bool generateDataSet(Acoustics::FITKAbstractSEASubSys* subSys) override;

        /**
         * @brief   Generate the actor with the sub-system data.[override]
         * @author  ChengHaotian (yeguangbaozi@foxmail.com)
         * @date    2024-11-04
         */
        void generateGraph() override;

        /**
         * @brief   Get the scale factor of the sub system.[override]
         * @author  ChengHaotian (yeguangbaozi@foxmail.com)
         * @date    2024-11-08
         */
        double getScaleFactor() override;

    };
}   // namespace Exchange

#endif // __FITKACOUSTICSVTKGRAPHOBJECTSEACAVITY_H__
